Summary Table

Starting at 1995-01-31. Ending at 2023-01-31. Number of periods 337. Periodicity is monthly.

summary_table

Base 100 (money)

library(dygraphs)

p  <- list()
  p[[1]] = dygraphs::dygraph(portfolio_data_xts(portfolios,data.name = 'cum_return'),
                             main = "Cumulative Return", group = "A") %>% 
    dyRebase(value = params$global.settings$starting.capital) %>%
    dyRangeSelector() %>%  dyOptions(colors = RColorBrewer::brewer.pal(6, "Set2")) %>%
    dyHighlight(highlightSeriesOpts = list(strokeWidth = 3)) %>% dyAxis("y",logscale = TRUE)



htmltools::tagList(p)

Base 100 (Percent)

library(dygraphs)

p  <- list()
  p[[1]] = dygraphs::dygraph(portfolio_data_xts(portfolios,data.name = 'cum_return'),
                             main = "Cumulative Return", group = "A") %>% 
    dyRebase(percent = TRUE) %>%
    dyRangeSelector() %>%  dyOptions(colors = RColorBrewer::brewer.pal(6, "Set2")) %>%
    dyHighlight(highlightSeriesOpts = list(strokeWidth = 3))



htmltools::tagList(p)

Static charts

library(ggplot2)


for(study in params$chart.settings$chart_studies){
  study_plot <- ggplot(portfolio_data(portfolios,data.name = study) , 
                       aes(x=date, y = value, color = name)) + geom_line() +
    theme_bw() + ggtitle(study) + geom_hline(yintercept = 0) 
  if(params$chart.settings$facets){
    study_plot <- study_plot  + facet_wrap(~name, scales = params$chart.settings$facets_scales)
  }
  
    if(params$chart.settings$facets){
    study_plot <- study_plot  + theme(legend.position = 'none')
    }
  
  print(study_plot)

}

Interactive charts

library(dygraphs)

p  <- list()
for(study in params$chart.settings$chart_studies){
  p[[study]] = dygraphs::dygraph(portfolio_data_xts(portfolios,data.name = study),main = study, group = "A") %>%
        dyHighlight(highlightSeriesOpts = list(strokeWidth = 3)) %>%
    dyOptions(colors = RColorBrewer::brewer.pal(6, "Set2"))
}


htmltools::tagList(p)

Relation analysis

if(length(names((portfolio_data_xts(portfolios)))) >1){
  chart.Correlation(portfolio_data_xts(portfolios)) 
}

chart.Boxplot(portfolio_data_xts(portfolios))

chart.RiskReturnScatter(portfolio_data_xts(portfolios))